<?PHP
	/*
		Configuration for the IMAP Email Notifier.
		
		This file contains configuration items used by the daemon.
		
		
		@author: Brian Roy
		@date: 09/26/2009
		
		
	*/
	
	// Basic connection information. These are required
	
	// IMAP (email) User Name
	define("USERNAME", "username");
	// IMAP (email) password
	define("PASSWORD", "password");
	// yes or no - use SSL for IMAP connections
	define("USESSL", "yes");
	// Folder name for the Inbox (or whatever folder you want to notify for)
	define("INBOX", "Inbox");
	// IMAP (email) server
	define("SERVER", "imap.gmail.com");
	// XMPP (Jabber/Google Talk) server.
	define("XMPP_SERVER", "my.xmpp.host.com");
	// XMPP User Name - this is the user that will do the notifying.
	define("XMPP_USER", "username");
	// XMPP Password
	define("XMPP_PASSWORD", "password");
	// XMPP user (full JID) to notify 
	define("XMPP_NOTIFY", "you@my.xmpp.host.com");
	
	
	// The following arrays filter the emails that we notify for. If you define none of these we notify for EVERY email.
	
	// If you have the Any arrays filled with values it turns off the Skip filtering.
	//		The filtering process works as follows:
	//			1) Apply Any filters (notify if from equals or contains, subject contains).
	//			2) If no Any filters apply Skip filters.
	//			3) If Any Filters do not apply Skip Filters.
	//			4) If no Any filters and no Skip Filters notify.
	
	// THESE ARE ALL EVALUATED WITHOUT REGARD FOR CASE.
	
	// List of from email adddresses that we will notifiy for. All others are ignored.
	$aryFromAny = array();
	
	// List of strings that, if they appear in the from of the email we notify for. All others ignored.
	$aryFromInAny = array();
	
	// List of strings that, if they appear in the Subject of the email we notify for. All others ignored.
	$arySubjInAny = array();
	
	// Array of FROM email addresses to NEVER notify for. These are exact match - in other words the email address 
	//		must match the address below EXACTLY (case insenstive).
	$aryFromSkip = array("reports@justsignal.com");
	
	// 	Array of strings that, if they appear in the from of the email we NEVER notify for. 
	$aryFromInSkip = array("Cron");
	
	// List of strings that, if they appear in the Subject of the email, we NEVER notify for.
	$arySubjInSkip = array();
	
	// How long to notify for an email. This is the max age of an email we will even
			// consider notifying for. Value is in seconds.
	define("OLDEST_NOTIFY", 60*5);
	
	// How long do we nap between checks for new mail. Value is in seconds.
	define("NAPTIME", 5);
	
	// Log file. REQUIRED
	define("LOGFILE", "/usr/local/email-notifier/notifier.log");
	
	// Debug logging on or off. 
	define("DEBUG", true);
	
	



?>